fix(camera): portrait preview aspect ratio + rebrand demo to 'Document Scanner' with icon#39
Merged
Merged
Conversation
controller.value.aspectRatio is the sensor ratio in landscape (>=1); using it directly forced the preview into a wide/short box on a portrait screen — small and horizontally squashed. Invert it in portrait so the preview fills the screen undistorted, which also aligns the guide overlay with the (portrait) captured image. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- App label "example" -> "Document Scanner". - New launcher icon (legacy + adaptive): a sheet of paper with a smartphone scanning it (green scan brackets + beam) on a blue gradient, generated via flutter_launcher_icons from assets/icon/*. Reproducible with example/tool/make_icon.py (Pillow). - APK output renamed DocumentScanner_v<version>.apk in both workflows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On-device the guided camera preview rendered as a small, horizontally-squashed landscape box on a portrait screen. Cause:
CameraController.value.aspectRatiois the sensor ratio in landscape orientation; wrappingCameraPreviewinAspectRatiowith it produces a wide/short box in portrait. Fix: invert the ratio in portrait so the preview fills the screen undistorted (and the trapezoid guide aligns with the portrait captured image).🤖 Generated with Claude Code